package com.wps.wdztv6.service;

import com.mybatisflex.core.service.IService;
import com.wps.wdztv6.api.common.TemplateFileEnum;
import com.wps.wdztv6.common.R;
import com.wps.wdztv6.config.WdztAppInfoConfig;
import com.wps.wdztv6.entity.TemplateFile;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.List;

/**
 * 服务层。
 *
 * @author lhl
 * @since 2023-11-01
 */
@Validated
public interface TemplateFileService extends IService<TemplateFile> {


    R<TemplateFile> saveTemplateFile(TemplateFile templateFile,
                                     @Validated
                                     @NotEmpty(message = WdztAppInfoConfig.USER_TOKEN_KEY + "请求头不能空")
                                     String token);

    void createTemplateBase(TemplateFileEnum templateFileEnum) throws IOException;

    void removeByIdsAndFiles(List<Integer> ids,
                             @Validated
                             @NotEmpty(message = WdztAppInfoConfig.USER_TOKEN_KEY + "请求头不能空")
                             String token);
}
